import http from "@/api/axios";

//账户管理-列表
export const getDeptAccountPageApi = (data: AccountKeeper.SearchFormParmas) => {
  return http({
    method: "post",
    url: "/base/biz/deptAccount/getDeptAccountPage",
    data
  });
};

//增加
export const addtDeptAccountPageApi = (data: AccountKeeper.FormState) => {
  return http({
    method: "post",
    url: "/base/biz/deptAccount/add",
    data
  });
};

//校验状态
export const checkStatusApi = (data: { idList: Array<string>; status: number }) => {
  return http({
    method: "post",
    url: "/base/biz/deptAccount/checkStatus",
    data
  });
};

//更改状态
export const updateStatusApi = (data: { idList: Array<string>; status: number }) => {
  return http({
    method: "post",
    url: "/base/biz/deptAccount/updateStatus",
    data
  });
};

//编辑
export const editStatusApi = (data: AccountKeeper.editForm) => {
  return http({
    method: "post",
    url: "/base/biz/deptAccount/edit",
    data
  });
};

//导入
export const importDeptAccountsApi = (data: File) => {
  return http({
    method: "post",
    url: "/base/biz/deptAccount/importDeptAccounts",
    data,
    headers: {
      "Content-type": "multipart/form-data"
    }
  });
};
//导入
export const deptAccountExcelApi = (data: AccountKeeper.SearchFormParmas | { list: AccountKeeper.ListRows[] }) => {
  return http({
    method: "post",
    url: "/export/biz/exportExcel/deptAccountExcel",
    data
  });
};
